package com.xiaoyu.awakening.gateway;

import com.alibaba.csp.sentinel.adapter.gateway.common.SentinelGatewayConstants;
import com.alibaba.csp.sentinel.config.SentinelConfig;
import com.xiaoyu.awakening.common.core.kit.SpringBeanKit;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.ComponentScan;

/**
 * gateway
 *
 * @author wangxiaoyu
 * @since v1.0
 */
@SpringBootApplication
@EnableDiscoveryClient
@ComponentScan("com.xiaoyu.awakening.*")
public class AwkGatewayApplication {
    public static void main(String[] args) {
        System.setProperty(SentinelConfig.APP_TYPE_PROP_KEY, Integer.toString(SentinelGatewayConstants.APP_TYPE_GATEWAY));
        ApplicationContext run = SpringApplication.run(AwkGatewayApplication.class, args);
        SpringBeanKit.setApplication(run);
    }
}